//
//  TestSwitchViewViewController.m
//  TestSwitchView
//
//  Created by Jacky Zhang on 11-4-19.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "TestSwitchViewViewController.h"

@implementation TestSwitchViewViewController

- (void)dealloc
{
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
}
*/

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction) goToPage1: (id)sender {
    Page1 *p1 = [[Page1 alloc] initWithNibName:@"Page1" bundle:nil];
    [UIView beginAnimations:@"animationID" context:nil];
    [UIView setAnimationDuration:0.8f];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationRepeatAutoreverses:NO];
    [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view.window cache:YES];
    [self.view addSubview:p1.view];
    [UIView commitAnimations];
    //[p1 release];
    
    
    
}
@end
